Project ID | FD17E29641C6117580258994003AF3B0 |
Version | 3 |
Class ID | 41BAE62232732E4D8025899F003A6B3A |
Class Type | Base |
Attributes |
%REM
The following code filters out values that are odd numbers
%END REM
Class AgeIncrementer as MapTransformer
Function transform(kvPair as Pair) as Boolean
Dim person as Person
Set person = kvPair.value
person.age++
Return new Pair(kvPair, person)
End Function
End Class
Dim map1 as New Map("PERSON", Nothing, False)
Dim map2 as Map("PERSON", Nothing, False)
Dim incrementer as New AgeIncrementer()
'Populate map1
Call map1.transform(incrementer, map2)
Copyright © HCL America, Inc. 1999, 2023. All Rights Reserved.